<template>
  <div>
    <w-export-excel
      :excel-type="excelType"
      :icon="Printer"
      :select-rows="selectRows"
      type="success"
      xlsx-name="exportExcelDemo"
    />
  </div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { Printer } from '@element-plus/icons-vue'

const selectRows = ref<Array<any>>([
  {
    name: 'sun',
    scores: 86,
    level: 'B',
  },
  {
    name: 'json',
    scores: 75,
    level: 'C',
  },
])

const excelType: any = {
  name: '姓名',
  scores: '得分',
  level: '级别',
}
</script>